package org.arclib.x.gui.widgets;

import org.arclib.Font;
import org.arclib.math.Point;
import org.arclib.math.Size;
import org.arclib.x.gui.themes.Theme;

public class Button extends Widget
{
	public void draw(Point parentPos)
	{
		Theme.theme.drawButton(action,focus, position.add(parentPos), size, color); 
		font.draw(parentPos.add(fontAlign), text, fontColor);
	}

	/// set font and set widget size correctly
	public void setFont(Font argFont)
	{
		font = argFont; 
		setSize(new Size(font.getWidth(text), font.getHeight())); 
	}
}
